<?php
                include("global.php");
                printHeader(false);
                session_start();
                $id = ($_GET["id"]); 
                
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
    <head>
        <style>
        body {
                    text-align: left;
            }
/* error message */
.error {
	height:15px;
	background-color:#FFFE36;
	font-size:11px;
	border:1px solid #E1E16D;
	padding:4px 10px;
	color:#000;
	display:none;	
	
	-moz-border-radius:4px;
	-webkit-border-radius:4px; 
	-moz-border-radius-bottomleft:0;
	-moz-border-radius-topleft:0;	
	-webkit-border-bottom-left-radius:0; 
	-webkit-border-top-left-radius:0;
	
	-moz-box-shadow:0 0 6px #ddd;
	-webkit-box-shadow:0 0 6px #ddd;	
}

</style>
        <link media="screen" type="text/css" href="style/form.css" rel="stylesheet" />
	<link media="screen" type="text/css" href="style/formcheck.css" rel="stylesheet" /> 
        
        <script type="text/javascript" src="files/js/core.js"></script>
	<script type="text/javascript" src="files/js/more.js"></script>
        <script type="text/javascript" src="files/js/lang/it.js"></script> 
<!--        <script src="files/js/jquery-1.4.2.js" type="text/javascript"></script>-->
<!--	<script type="text/javascript" src="files/js/jquery.tools.min.js"></script> -->
        <script type="text/javascript" src="files/js/formcheck.js"></script> 
        
    </head>
    
    <body>
                <?php
                   $msql  = new Db;
                   $msql->connect();
                   $sql="SELECT InsertDate,Destination,Kind,Status,Message,StatusMessage FROM communications WHERE IDCommunication=$id";
                   $result=$msql->execute($sql);
                   $row=mysql_fetch_array($result);
                   $msql->disconnettiDB();
                   print(" <form class=\"formular\" id=\"formular\" method=\"post\" action=\"#\">
                       <fieldset><legend>Dettaglio allarme inviato</legend> ");                      
                        print("
                                        <label> 					
                                            <span>Data inserimento: </span>
                                            <input type=\"text\" value=\"".$row['InsertDate']."\" readonly=\"readonly\"/>				
                                        </label>
                                        <label>
                                            <span>Destinazione : </span>
                                            <input type=\"text\" value=\"".$row['Destination']."\" readonly=\"readonly\"/>
                                        </label>
                                        <label>
                                            <span>Tipo : </span>
                                            <input type=\"text\" value=\"".$row['Kind']."\" readonly=\"readonly\"/>
                                        </label>
                                        <label>
                                            <span>Stato : </span>
                                            <input type=\"text\" value=\"".$row['Status']."\" readonly=\"readonly\"/>
                                        </label>");
                        print("    <label>
                                   <span>Messaggio : </span>
                                   <textarea cols=\"1\" rows=\"1\" style=\"width: 98%;\"> ".$row['Message']."</textarea>
                                   </label>       
                               ");
                        if($row['StatusMessage'] != "")
                            print("<label>
                                            <span>Stato : </span>
                                            <textarea cols=\"15\" rows=\"5\" style=\"width: 98%;\"> ".$row['StatusMessage']."</textarea>
                                   </label>
                                ");
                        print("</fieldset></form>");
              ?>
    <br />
</body>
</html>